package com.learn.rpc.common;

import java.time.LocalDateTime;

/**
 * @author wangxing
 * @version 2020/8/14 17:07 Administrator
 */
public class AdminUserServiceImpl implements IAdminUserService {
    @Override
    public AdminUser findAdminUserById(Integer id) {
        return new AdminUser(id, LocalDateTime.now().toString());
    }

    @Override
    public AdminUser findAdminUserByName(String name) {
        return new AdminUser((int) (System.currentTimeMillis() & 2047), name);
    }

    @Override
    public String getNameAndId(Integer id, String name) {
        return "id = " + (id & 31) + ";name=" + name;
    }
}
